<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            border: 1px solid red;
        }
        .con{
            display: flex;
            justify-content: center;
            align-items: stretch;
            border: 1px solid yellow;
            /* height: 500px; */
        }
        .con ul{
            list-style-type: none;
        }
        .con ul li{
            height: 50px;
            width: 30px;
            text-align: center;
            line-height: 50px;
        }
       
        .con .img_con{
            width: 30%;
            /* height: 500px; */
            background-repeat: no-repeat;
            background-size: contain;
            background-position: center center;
            background-image: url(../img/java.png);
            transition: all 100ms;
        }
    </style>
    <script src="../js/jquery.js"></script>
    <script>
        let urls = ['../img/快乐加倍.png','../img/java.png','../img/greenbtn.png','../img/java.png','../img/greenbtn.png']
        $(function(){
            $(".con ul li").hover(function(){
                $(this).css('background','gray').siblings().css("background",'')
                console.log($(this));
                let index = $(this).index();
                $(".img_con").css({
                    'background-image': 'url('+urls[index]+')'
                })
            })
        })
    </script>
</head>
<body>
    <div class="con">
        <ul>
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
        </ul>
        <div class="img_con">
            内容
        </div>
    </div>
</body>
</html>